// 教师板块
import type { AppRouteModule } from '/@/router/types';
import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';
import { RoleEnum } from '/@/enums/roleEnum';





const teacher: AppRouteModule = {
  path: '/teacher',
  name: 'Teacher',
  component: LAYOUT,
  redirect: '/teacher/workbench',
  meta: {
    orderNo: 2,
    icon: 'ion:grid-outline',
    title: t('routes.teacher.teacher.module'),
    // roles: [RoleEnum.SUPER, RoleEnum.TEACHER_ADMIN, RoleEnum.TEACHER, RoleEnum.TEST],
    roles: [RoleEnum.SUPER, RoleEnum.TEACHER_ADMIN, RoleEnum.TEACHER, RoleEnum.TEST],
    hideChildrenInMenu: false,
  },
  children: [
    {
      path: 'workbench',
      name: 'TeacherWorkbench',
      component: () => import('/@/views/teacher/workbench.vue'),
      meta: {
        // affix: true,
        title: t('routes.teacher.teacher.workbench'),
      },
    },
    {
      path: 'manage',
      name: 'Teacher',
      component: () => import('/@/views/teacher/manage.vue'),
      meta: {
        // affix: true,
        title: t('routes.teacher.teacher.manage'),
      },
    },
    {
      path: 'classdetails',
      name: 'Classdetails',
      component: () => import('/@/views/teacher/classdetails.vue'),
      meta: {
        // affix: true,
        title: t('routes.teacher.teacher.classdetails'),
        hideMenu: true,
      },
    },
    {
      path: 'PublishedArticles',
      name: 'PublishedArticles',
      component: () => import('/@/views/student/PublishedArticles.vue'),
      meta: {
        title: t('routes.student.student.PublishedArticles'),
      },
    },
  ],
};

export default teacher;
